package com.demo.grpc.intercepter;

import io.grpc.*;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class LogGrpcInterceptor implements ClientInterceptor {

    @Override
    public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(
            MethodDescriptor<ReqT, RespT> method, 
            CallOptions callOptions, 
            Channel channel) {
        log.info("拦截器："+method.getFullMethodName());
        return channel.newCall(method, callOptions);
    }
}
